import * as nls from 'vscode-nls'
nls.config({
  messageFormat: nls.MessageFormat.both,
  bundleFormat: nls.BundleFormat.standalone,
})()

const localize = nls.loadMessageBundle()

export const ERROR_TIP_TASK_BUSSY = localize('ERROR_TIP_TASK_BUSSY', "当前有其它任务正在运行，请稍后再试");
export const YES = localize('yes', "是");
export const NO = localize('no', "否");
export const OK = localize("ok", "确定");
export const UP = localize("up", "向上")
export const DOWN = localize("DOWN", "向下")
export const DELETE = localize("DELETE", "删除")
export const DELETE_ALL = localize("DELETE_ALL", "删除全部")
export const TOP_OR_BOTTOM = localize("TOP_OR_BOTTOM", "置顶/置底")
export const BACKUP = localize("BACKUP", "备份")
export const RENAME = localize("RENAME", "重命名")
export const RECOVER = localize("RECOVER", "恢复")
export const CLOSE = localize("CLOSE", "关闭")


export const PICK_DIALOG_PLACEHOLDER_TEXT = (name: string): string => {
  return localize("PICK_DIALOG_PLACEHOLDER_TEXT", `当前分组：{0}，选择或创建分组`, name)
}

export const GOURP_NAME_DIALOG_PLACEHOLDER_TEXT = localize("GOURP_NAME_DIALOG_PLACEHOLDER_TEXT", "请输入分组名")
export const ERROR_TIP_GROUP_NAME_CANNOT_BE_EMPTY = localize("ERROR_TIP_GROUP_NAME_CANNOT_BE_EMPTY", "分组名不能为空")
export const ERROR_TIP_GROUP_NAME_EXISTS = localize("ERROR_TIP_GROUP_NAME_EXISTS", "分组名已经存在，请更换后重试")

export const PICK_DIALOG_SWIFT_GROUP_PLACEHOLDER_TEXT = (name: string): string => {
  return localize("PICK_DIALOG_SWIFT_GROUP_PLACEHOLDER_TEXT", `当前分组：{0}，选择要切换的分组`, name)
}

export const DEFAULT_GROUP_NAME = localize("DEFAULT_GROUP_NAME", "默认")
export const CREATE_GROUP_NAME = localize("CREATE_GROUP_NAME", "创建分组")
export const CURRRNT_GROUP_NAME = (name: string) => {
  return localize("CURRRNT_GROUP_NAME", "当前分组：{0}", name)
}

export const INFO_TIP_ADD_PROJECT_FINISHED = localize("INFO_TIP_ADD_PROJECT_FINISHED", "添加项目完成...")
export const INFO_TIP_SWITCHING_GROUP = localize("INFO_TIP_SWITCHING_GROUP", "正在切换项目分组，请稍后...")
export const INFO_TIP_SWITCHED_GROUP = localize("INFO_TIP_SWITCHED_GROUP", "项目分组切换完成！")

export const INFO_TIP_PROJECTS_COUNT = (count: number) => {
  return localize("INFO_TIP_PROJECTS_COUNT", "项目数量：{0} 个", count)
}

export const CONTROL_DIALOG_TITLE = localize("CONTROL_DIALOG_TITLE", "控件面板")
export const PROJECTS_IN_GROUP = localize("PROJECTS_IN_GROUP","组内项目")
export const INPUT_ALIAS = localize("INPUT_ALIAS", "请输入别名")
export const SKIP_GROUP_TITLE_PROJECT = localize("SKIP_GROUP_TITLE_PROJECT", "检测到存在分组标题项目，已经自动跳过")


export const PICK_DIALOG_OPEN_GROUP_PLACEHOLDER_TEXT = (name: string): string => {
  return localize("PICK_DIALOG_OPEN_GROUP_PLACEHOLDER_TEXT", `当前分组：{0}，选择要打开的分组`, name)
}